require('Particles')
require('Shaders')

Collectible = {}
Collectible.__index = Collectible

function Collectible.load(x,y)
	
	local collectible = {}
	setmetatable(collectible, Collectible)
	collectible.x = x
	collectible.y = y
	--collectible.pixelEffect = love.graphics.newPixelEffect((Shaders.getNoEffect()):format(#collectible))
	
	collectible.particleSys = Particles.getCollectibleParticleSys(0,0)
	collectible.particleSys:start()
	return collectible
	
end

function Collectible:update(dt)

	self.particleSys:update(dt)
	
end

function Collectible:draw()

	love.graphics.setColorMode("modulate")
	love.graphics.setBlendMode("additive")
	love.graphics.draw(self.particleSys, self.x, self.y)
			
end
